<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:66:"C:\wamp\www\tp5\public/../application/admin\view\advert\index.html";i:1487302620;s:64:"C:\wamp\www\tp5\public/../application/admin\view\common\top.html";i:1487071816;s:65:"C:\wamp\www\tp5\public/../application/admin\view\common\left.html";i:1487677610;}*/ ?>
<!DOCTYPE html>
<html>
    <head>
	    <meta charset="utf-8">
        <title>广告管理首页</title>
        <meta name="description" content="Dashboard">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <!--Basic Styles-->
        <link href="__PUBLIC__/bootstrap.css" rel="stylesheet">
        <link href="__PUBLIC__/font-awesome.css" rel="stylesheet">
        <link href="__PUBLIC__/weather-icons.css" rel="stylesheet">
        <!--Beyond styles-->
        <link id="beyond-advert" href="__PUBLIC__/beyond.css" rel="stylesheet" type="text/css">
        <link href="__PUBLIC__/demo.css" rel="stylesheet">
        <link href="__PUBLIC__/typicons.css" rel="stylesheet">
        <link href="__PUBLIC__/animate.css" rel="stylesheet">        
    </head>
    <body>
    	<!-- 头部 -->
    	<div class="navbar">
    <div class="navbar-inner">
        <div class="navbar-container">
            <!-- Navbar Barnd -->
            <div class="navbar-header pull-left">
                <a href="<?php echo url('index/index'); ?>" class="navbar-brand">
                    <small><img src="__IMGFILE__/logo.jpg" alt=""></small>
                </a>
            </div>
            <!-- /Navbar Barnd -->
            <!-- Sidebar Collapse -->
            <div class="sidebar-collapse" id="sidebar-collapse">
                <i class="collapse-icon fa fa-bars"></i>
            </div>
            <!-- /Sidebar Collapse -->
            <!-- Account Area and Settings -->
            <div class="navbar-header pull-right">
                <div class="navbar-account">
                    <ul class="account-area">
                        <li>
                            <a class="login-area dropdown-toggle" data-toggle="dropdown">
                                <div class="avatar" title="操作">
                                    <img src="__IMGFILE__/adam-jansen.jpg">
                                </div>
                                <section>
                                    <h2><span class="profile"><span><?php echo \think\Request::instance()->session('a_username'); ?></span></span></h2>
                                </section>
                            </a>
                            <!--Login Area Dropdown-->
                            <ul class="pull-right dropdown-menu dropdown-arrow dropdown-login-area">
                                <li class="username"><a></a></li>
                                <li class="dropdown-footer">
                                    <a href="<?php echo url('pub/logout'); ?>">退出登录</a>
                                </li>
                                <li class="dropdown-footer">
                                    <a href="<?php echo url('admin/edit',array('a_id'=>\think\Request::instance()->session('a_id'))); ?>">修改密码</a>
                                </li>
                            </ul>
                            <!--/Login Area Dropdown-->
                        </li>
                        <!-- /Account Area -->
                        <!--Note: notice that setting div must start right after account area list.
                            no space must be between these elements-->
                        <!-- Settings -->
                    </ul>
                </div>
            </div>
            <!-- /Account Area and Settings -->
        </div>
    </div>
</div>
    	<!-- /头部 -->
    	
    	<div class="main-container container-fluid">
    		<div class="page-container">
    			            <!-- Page Sidebar -->
                <div class="page-sidebar" id="sidebar">
                <!-- Page Sidebar Header-->
                <div class="sidebar-header-wrapper">
                    <input class="searchinput" type="text">
                    <i class="searchicon fa fa-search"></i>
                    <div class="searchhelper"></div>
                </div>
                <!-- /Page Sidebar Header -->
                <!-- Sidebar Menu -->
                <ul class="nav sidebar-menu">
                    <!--Dashboard-->
                    <li>
                        <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-user"></i>
                            <span class="menu-text">管理员 </span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                            <li>
                                <a href="<?php echo url('admin/index'); ?>">
                                    <span class="menu-text">管理列表</span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                            <li>
                                <a href="<?php echo url('admin/add'); ?>">
                                    <span class="menu-text">
                                        管理添加                                    </span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                        </ul>                            
                    </li> 
                    <li>
                        <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-user"></i>
                            <span class="menu-text">角色 </span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                            <li>
                                <a href="<?php echo url('role/index'); ?>">
                                    <span class="menu-text">角色列表</span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                            <li>
                                <a href="<?php echo url('role/add'); ?>">
                                    <span class="menu-text">
                                        添加角色                                    </span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                        </ul>                            
                    </li>
                    <li>
                        <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-gear"></i>
                            <span class="menu-text">节点</span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                            <li>
                                <a href="<?php echo url('node/index'); ?>">
                                    <span class="menu-text">节点列表</span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                            <li>
                                <a href="<?php echo url('node/add'); ?>">
                                    <span class="menu-text">添加节点</span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                        </ul>                            
                    </li>
                    <li>
                        <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-list"></i>
                            <span class="menu-text">分类管理</span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                            <li>
                                <a href="<?php echo url('cate/index'); ?>">
                                    <span class="menu-text">分类列表</span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                        </ul>                            
                    </li> 

                    <li>
                        <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-file-text"></i>
                            <span class="menu-text">帖子管理</span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                            <li>
                                <a href="<?php echo url('note/index'); ?>">
                                    <span class="menu-text">帖子列表 </span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                        </ul>                            
                    </li> 

                    <li>
                        <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-link"></i>
                            <span class="menu-text">友情链接</span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                            <li>
                                <a href="<?php echo url('link/index'); ?>">
                                    <span class="menu-text">链接列表</span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                            <li>
                                <a href="<?php echo url('link/add'); ?>">
                                    <span class="menu-text">添加链接</span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                        </ul>                            
                    </li> 

                    <li>
                        <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-link"></i>
                            <span class="menu-text">广告管理</span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                            <li>
                                <a href="<?php echo url('advert/index'); ?>">
                                    <span class="menu-text">广告列表</span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                            <li>
                                <a href="<?php echo url('advert/add'); ?>">
                                    <span class="menu-text">添加广告</span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                        </ul>                            
                    </li>

                    <li>
                        <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-link"></i>
                            <span class="menu-text">新闻管理</span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                            <li>
                                <a href="<?php echo url('news/index'); ?>">
                                    <span class="menu-text">新闻列表</span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                        </ul>                            
                    </li>

                    <li>
                        <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-user"></i>
                            <span class="menu-text">用户管理</span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                            <li>
                                <a href="<?php echo url('user/index'); ?>">
                                    <span class="menu-text">用户列表</span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                            <li>
                                <a href="<?php echo url('urole/index'); ?>">
                                    <span class="menu-text">用户角色</span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                        </ul>
                    </li>

                    <li>
                        <a href="#" class="menu-dropdown">
                            <i class="menu-icon fa fa-gear"></i>
                            <span class="menu-text">系统</span>
                            <i class="menu-expand"></i>
                        </a>
                        <ul class="submenu">
                            <li>
                                <a href="<?php echo url('tags/index'); ?>">
                                    <span class="menu-text">模块管理</span>
                                    <i class="menu-expand"></i>
                                </a>
                            </li>
                        </ul>                            
                    </li>                        
                    
                                           
                    
                </ul>
                <!-- /Sidebar Menu -->
            </div>
                <!-- /Page Sidebar -->
                <!-- Page Content -->
                <div class="page-content">
                    <!-- Page Breadcrumb -->
                    <div class="page-breadcrumbs">
                        <ul class="breadcrumb">
                             <li><a href="<?php echo url('index/index'); ?>">系统</a> </li>
                             <li class="active">广告管理</li>
                        </ul>
                    </div>
                    <!-- /Page Breadcrumb -->
                    <!-- Page Body -->
                    <div class="page-body">
                        <button type="button" tooltip="添加链接" class="btn btn-sm btn-azure btn-addon" onClick="javascript:window.location.href = '<?php echo url('advert/add'); ?>'"> <i class="fa fa-plus"></i> Add
                        </button>
                        <div class="row">
                            <div class="col-lg-12 col-sm-12 col-xs-12">
                                <div class="widget">
                                    <div class="widget-body">
                                        <div class="flip-scroll">
                                            <table class="table table-bordered table-hover">
                                                <thead class="">
                                                    <tr>
                                                        <th class="text-center" width="4%">ID</th>
                                                        <th class="text-center">广告名称</th>
                                                        <th class="text-center" width="6%">类型</th>
                                                        <th class="text-center">广告地址</th>
                                                        <th class="text-center">广告描述</th>
                                                        <th class="text-center">缩略图</th>
                                                        <th class="text-center" width="6%">状态</th>
                                                        <th class="text-center" width="18%">操作</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                                                    <tr>
                                                        <td align="center"><?php echo $vo['id']; ?></td>
                                                        <td align="center"><?php echo $vo['title']; ?></td>
                                                        <td align="center"><?php if($vo['type'] == 0): ?>普通<?php else: ?>精推
                                                        <?php endif; ?></td>
                                                        <td align="center"><a href="<?php echo $vo['url']; ?>" target="_blank"><?php echo $vo['url']; ?></a></td>
                                                        <td align="center">
                                                            <?php if($vo['desc'] != ''): ?>
                                                            <?php echo $vo['desc']; else: ?>
                                                            暂无描述
                                                            <?php endif; ?>
                                                        </td>
                                                        <td align="center">
                                                            <?php if($vo['pic'] != ''): ?>
                                                            <img src="<?php echo $vo['pic']; ?>" height="30">
                                                            <?php else: ?>
                                                            暂无缩略图
                                                            <?php endif; ?>
                                                        </td>
                                                        <td align="center"><?php if($vo['status'] == 0): ?>禁用<?php else: ?>启用
                                                        <?php endif; ?></td>
                                                        <td align="center">
                                                            <a href="<?php echo url('advert/edit',array('id'=>$vo['id'])); ?>" class="btn btn-primary btn-sm shiny">
                                                                <i class="fa fa-edit"></i> 编辑
                                                            </a>
                                                            <a href="#" onClick="warning('确实要删除吗', '<?php echo url('advert/del',array('id'=>$vo['id'])); ?>')" class="btn btn-danger btn-sm shiny">
                                                                <i class="fa fa-trash-o"></i> 删除
                                                            </a>
                                                        </td>
                                                    </tr>
                                                    <?php endforeach; endif; else: echo "" ;endif; ?>
                                                </tbody>
                                            </table>
                                        </div>
                                        <div style="text-align:right; margin-top:10px;"><?php echo $list->render(); ?></div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    <!-- /Page Body -->
                </div>
                <!-- /Page Content -->
    		</div>	
    	</div>

        <!--引入外部文件-->
        <script src="__PUBLIC__/jquery_002.js"></script>
        <script src="__PUBLIC__/bootstrap.js"></script>
        <script src="__PUBLIC__/jquery.js"></script>
        <script src="__PUBLIC__/beyond.js"></script>
    </body>
</html>